package com.fce.boc.config;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.core.HeadersExchange;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ExchangeConfig {
    /**
     * Direct交换机 起名：directExchange
     */
    @Bean
    public static DirectExchange directExchange() {
        return new DirectExchange("directExchange");
    }
    /**
     * Topic交换机 起名：topicExchange
     */
    @Bean
    public static TopicExchange topicExchange() {
        return new TopicExchange("topicExchange");
    }
    /**
     * fanout交换机 起名：fanoutExchange
     */
    @Bean
    public static FanoutExchange fanoutExchange() {
        return new FanoutExchange("fanoutExchange");
    }
    @Bean
    public static HeadersExchange headersExchange() {
        return new HeadersExchange("headersExchange");
    }

}
